package agents.interaction;

import game.constants.ReferenceAgent;
import game.constants.ReferenceObject;
import game.constants.ReferenceSpecialFeature;
import interfaces.impl.HumanInteraction;
import objects.SpetialFeature;
import objects.WorldObject;
import universe.Universe;
import actions.ActionCreateStarcraftObject;

public class InteractionCreateSCV extends HumanInteraction{
	
	ActionCreateStarcraftObject actionCreateStarcraftObject;
	
	SpetialFeature scvPrice;

	@Override
	public void initializeParametersList() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void initializeActionList() {

		actionCreateStarcraftObject=new ActionCreateStarcraftObject();
		addAction(actionCreateStarcraftObject);
	}

	@Override
	public void initializeSpecialFeatures() {

		scvPrice= new SpetialFeature(ReferenceSpecialFeature.SPETIAL_FEATURE_SCV_PRICE);
		addSpetialFeature(scvPrice);
	}

	@Override
	public void initializeName() {
		name="Build SCV";
		
	}

	@Override
	public void initializeId() {
		id=ReferenceAgent.AGENT_HUMAN_INTERACTION_BUILD_SCV;
		
	}

	@Override
	public void updateChild(WorldObject object, Universe universe, double time) {
		
		actionCreateStarcraftObject.setSource(object);
		actionCreateStarcraftObject.setTarget(object);
		actionCreateStarcraftObject.setObjectReference(ReferenceObject.OBJECT_REFERENCE_SVC1);
		actionCreateStarcraftObject.setPrice(scvPrice.getValue());
		universe.setAction(actionCreateStarcraftObject);
		isActive=false;
		
		
	}
	
	

}
